<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			document.write("<ul>")
			function box(a){
				for(var i=0;i<a;i++){
					if(i%2==0){
						document.write("<li style='background: red;'>"+i+"</li>")
					}else{
						document.write("<li style='background: blue;'>"+i+"</li>")
					}
				}
			}
			document.write("</ul>")
			box(10);
		</script>
	</body>
</html>
